import { invoke } from '@tauri-apps/api/core';
import { DeleteCondition, DeleteOptions, QueryCondition, QueryExtention, QueryOptions, ComparsionOperator, UpdateCondition, UpdateOptions } from '../types';
import optionsWrap from '@/components/datasets/create/website/base/options-wrap';


export interface DomainConfigureOption {
    domains: string[],
}


export interface DataSourceConfigureOption {
    datasources: string[],
}

export interface SchedulerConfigureOption {
    tasks: string[],
}


export interface ServerConfigureOption {
    domain: DomainConfigureOption,
    datasource?: DataSourceConfigureOption,
    scheduler?: SchedulerConfigureOption,
    features: string[],
}


export const builderServerConfigExport = async (target: string, option: ServerConfigureOption): Promise<any> => {
    console.log(option);
    let res = await invoke('plugin:mg-platform|builder_gserver_config', { target, option });
    console.log(res);
    return res;
}